package com.collect.cameroon.zhiBean.zhiReceive;

import android.text.TextUtils;

import com.collect.cameroon.zhiUtils.StringUtil;

import java.io.Serializable;
import java.math.BigDecimal;

public class ZHIRPerfermanceEntity implements Serializable {

    private String overdueDate;
    private String sysUserName;

    private String totalOverdueSettleOrderNum;
    private String totalOverdueSettleManuOrderNum;
    private String sysUserId;

    private String totalOverdueSettleSysOrderNum;
    private String totalOverdueSettleRate;
    private String dayOverdueSysOrderNum;
    private String dayOverdueManuOrderNum;

    //v2
    private String appId;

    public String getOverdueDate() {
        return overdueDate;
    }

    public void setOverdueDate(String overdueDate) {
        this.overdueDate = overdueDate;
    }

    public String getSysUserName() {
        return sysUserName;
    }

    public void setSysUserName(String sysUserName) {
        this.sysUserName = sysUserName;
    }

    public String getTotalOverdueSettleOrderNum() {
        if (TextUtils.isEmpty(totalOverdueSettleOrderNum)) {
            totalOverdueSettleOrderNum = "0";
        }
        try {
            return new BigDecimal(totalOverdueSettleOrderNum).stripTrailingZeros().toPlainString();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return totalOverdueSettleOrderNum;
    }

    public void setTotalOverdueSettleOrderNum(String totalOverdueSettleOrderNum) {
        this.totalOverdueSettleOrderNum = totalOverdueSettleOrderNum;
    }

    public String getTotalOverdueSettleManuOrderNum() {
        if (TextUtils.isEmpty(totalOverdueSettleManuOrderNum)) {
            totalOverdueSettleManuOrderNum = "0";
        }
        try {
            return new BigDecimal(totalOverdueSettleManuOrderNum).stripTrailingZeros().toPlainString();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return totalOverdueSettleManuOrderNum;
    }

    public void setTotalOverdueSettleManuOrderNum(String totalOverdueSettleManuOrderNum) {
        this.totalOverdueSettleManuOrderNum = totalOverdueSettleManuOrderNum;
    }

    public String getSysUserId() {
        return sysUserId;
    }

    public void setSysUserId(String sysUserId) {
        this.sysUserId = sysUserId;
    }

    public String getTotalOverdueSettleSysOrderNum() {
        if (TextUtils.isEmpty(totalOverdueSettleSysOrderNum)) {
            totalOverdueSettleSysOrderNum = "0";
        }
        try {
            return new BigDecimal(totalOverdueSettleSysOrderNum).stripTrailingZeros().toPlainString();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return totalOverdueSettleSysOrderNum;
    }

    public void setTotalOverdueSettleSysOrderNum(String totalOverdueSettleSysOrderNum) {
        this.totalOverdueSettleSysOrderNum = totalOverdueSettleSysOrderNum;
    }

    public String getTotalOverdueSettleRate() {
        return totalOverdueSettleRate;
    }

    public void setTotalOverdueSettleRate(String totalOverdueSettleRate) {
        this.totalOverdueSettleRate = totalOverdueSettleRate;
    }

    public String getDayOverdueSysOrderNum() {
        if (TextUtils.isEmpty(dayOverdueSysOrderNum)) {
            dayOverdueSysOrderNum = "0";
        }
        try {
            return new BigDecimal(dayOverdueSysOrderNum).stripTrailingZeros().toPlainString();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return dayOverdueSysOrderNum;
    }

    public BigDecimal getDayOverdueSysOrderNumOri() {
        if (TextUtils.isEmpty(dayOverdueSysOrderNum)) {
            dayOverdueSysOrderNum = "0";
        }
        try {
            return new BigDecimal(dayOverdueSysOrderNum).stripTrailingZeros();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return new BigDecimal("0").stripTrailingZeros();
    }

    public void setDayOverdueSysOrderNum(String dayOverdueSysOrderNum) {
        this.dayOverdueSysOrderNum = dayOverdueSysOrderNum;
    }

    public String getDayOverdueManuOrderNum() {
        if (TextUtils.isEmpty(dayOverdueManuOrderNum)) {
            dayOverdueManuOrderNum = "0";
        }
        try {
            return new BigDecimal(dayOverdueManuOrderNum).stripTrailingZeros().toPlainString();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return dayOverdueManuOrderNum;
    }

    public BigDecimal getDayOverdueManuOrderNumOri() {
        if (TextUtils.isEmpty(dayOverdueManuOrderNum)) {
            dayOverdueManuOrderNum = "0";
        }
        try {
            return new BigDecimal(dayOverdueManuOrderNum).stripTrailingZeros();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return new BigDecimal("0").stripTrailingZeros();
    }

    public void setDayOverdueManuOrderNum(String dayOverdueManuOrderNum) {
        this.dayOverdueManuOrderNum = dayOverdueManuOrderNum;
    }

    public String getAppId() {
        return StringUtil.safeString(appId);
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getTotalCaseNum(){
        BigDecimal totalCaseNum = (getDayOverdueSysOrderNumOri().add(getDayOverdueManuOrderNumOri())).stripTrailingZeros();
        return totalCaseNum.toPlainString();
    }
}
